﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace TalksLog.UI.Models.BindingModels
{
    public class RegisterAccountBM
    {
        [Display(Name = "昵称")]
        [Required(ErrorMessage ="请填写昵称")]       
        [StringLength(10, ErrorMessage = "昵称长度不能超过10位")]
        [MinLength(2, ErrorMessage = "昵称长度至少需要2位")]
        public string Name { get; set; }

        [Display(Name = "性别")]
        [Required(ErrorMessage = "请选择性别")]
        public string Gender { get; set; }

        [Display(Name = "电子邮箱")]
        [Required(ErrorMessage = "请填写电子邮箱")]
        [EmailAddress(ErrorMessage = "请填写正确的电子邮箱格式")]
        public string Email { get; set; }

        [Display(Name = "密码")]
        [Required(ErrorMessage = "请填写密码")]
        [MinLength(6, ErrorMessage ="密码长度至少需要6位")]
        public string Password { get; set; }

        [Display(Name = "再次输入密码")]
        [Required(ErrorMessage = "请再次输入密码")]
        [Compare("Password", ErrorMessage ="两次密码输入不一致")]
        public string ConfirmPassword { get; set; }
    }
}
